﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using VietApps.TouristManagement.AppCode;


namespace VietApps.TouristManagement
{
    public partial class frmRolePerms : Form
    {
        public frmRolePerms()
        {
            InitializeComponent();
        }
        //DataTable tblTmp = new DataTable();
        //BLL.PermissionGroups BLLPermissionGroups = new BLL.PermissionGroups();
        //BLL.GroupPermissions BLLGroupPermissions = new BLL.GroupPermissions();
        //Int32 PerMissionID;

       

        //void loadPermissionGroup()
        //{
        //    cmbPermission.ValueMember = "PermissionGroupID";
        //    cmbPermission.DisplayMember = "PermissionGroupName";
        //    cmbPermission.DataSource = BLLPermissionGroups.load();
        //}


        //private void frmPermissions_Load(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        tvPermission.CheckBoxes = true;
        //        loadPermissionGroup();
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message, AppResources.MsgTitle.erro, MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}
        //private void cmbPermission_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        PerMissionID = Int32.Parse(cmbPermission.SelectedValue.ToString());
        //        tblTmp = BLLGroupPermissions.load(PerMissionID);
        //        mnuGen.exploreMenu(tvPermission, new frmMain().mnu, tblTmp);
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message, AppResources.MsgTitle.erro, MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}

        //private void btnSave_Click(object sender, EventArgs e)
        //{
        //    String _itemlist = String.Empty;
        //    try
        //    {
        //        _itemlist = mnuGen.checkTreeView(tvPermission, '\\');
        //        String[] Permissions = _itemlist.Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries);
        //        BLLGroupPermissions.del(PerMissionID);
        //        foreach (String item in Permissions)
        //        {
        //            BLLGroupPermissions.ins(PerMissionID, item);
        //        }
        //        MessageBox.Show(AppResources.MsgContent.saveSuccess, AppResources.MsgTitle.infomation, MessageBoxButtons.OK, MessageBoxIcon.Information);
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.Message, AppResources.MsgTitle.erro, MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    }
        //}

        //private void btnClose_Click(object sender, EventArgs e)
        //{
        //    this.Close();
        //}


    }
}
